﻿<%@ Page Title="" Language="C#" MasterPageFile="~/PBOfficeMaster.master" AutoEventWireup="true"
    CodeFile="Staff.aspx.cs" Inherits="PersonalManager_Staff" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link type="text/css" rel="Stylesheet" href="../css/PersonalManagerCss.css" />
    <script type="text/javascript" src="../js/jquery-1.9.1.min.js"></script>
    <script type="text/javascript">
//        $(
//        function () {
//            $("#rbOk").click(
//            function(){

//            }
//            );
//        }
//        );
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div style="width: 864px;">
        <div class="branchtop">
            <table>
                <tr>
                    <td>
                        当前位置
                    </td>
                    <td>
                        <div class="lbBranch">
                            员工管理</div>
                    </td>
                </tr>
            </table>
        </div>
        <hr />
        <div style="text-align: right; padding: 0 30px;">
            <asp:Button ID="btnAdd" CssClass="btnBranch" runat="server" Text="添加员工" OnClick="btnAdd_Click" />
        </div>
        <div style="margin-top: 7px; margin-bottom: 7px; margin-left: 45px;">
            <asp:GridView ID="gvStaff" runat="server" BorderColor="#00CCFF" BorderStyle="Solid"
                Font-Size="14px" AutoGenerateColumns="False" DataKeyNames="StfId" Width="789px"
                AllowPaging="True" PageSize="1" OnRowUpdating="gvStaff_RowUpdating" OnRowDataBound="gvStaff_RowDataBound">
                <AlternatingRowStyle BackColor="#F4FCFE" />
                <Columns>
                    <asp:BoundField DataField="StfCode" HeaderText="员工编号" ReadOnly="True" SortExpression="StfCode" />
                    <asp:BoundField DataField="StfName" HeaderText="员工姓名" SortExpression="StfName" />
                    <asp:TemplateField HeaderText="部门" SortExpression="DeptId">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Department.DeptName") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label1" runat="server" Text='<%# Bind("Department.DeptName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="岗位" SortExpression="PosId">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("Position.PosName") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="Label2" runat="server" Text='<%# Bind("Position.PosName") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="修改">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:ImageButton ID="ImageButton1" Height="15px" Width="15px" CommandName="Update"
                                runat="server" ImageUrl="~/imges/modify.png" />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="状态" SortExpression="Status">
                        <EditItemTemplate>
                            <asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Status") %>'></asp:TextBox>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:Label ID="lbStatus" runat="server" Visible="false" Text='<%# Bind("Status") %>'></asp:Label>
                            <asp:RadioButton ID="rbOk" runat="server" GroupName="status" Text="启用" /><asp:RadioButton
                                ID="rbNo" runat="server" Text="禁用" GroupName="status" />
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle BackColor="#66CCFD" BorderColor="#33CCFF" Font-Size="14px" ForeColor="White" />
                <RowStyle BackColor="#FDFEFF" />
            </asp:GridView>
        </div>
    </div>
</asp:Content>
